package com.laity;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import tk.mybatis.spring.annotation.MapperScan;

/**
 * @author: Laity
 * @Project: JavaLaity
 * @Package: com.laity.Application
 * @Date: 2023年11月14日 19:54
 * @Description: SpringBoot启动类
 */
@Slf4j
@ServletComponentScan
@MapperScan(basePackages = "com.laity.mapper")  /*扫描 mybatis 通用 mapper 所在的包*/
// 扫描所有包 以及 相关组件包 idworker => 主键生成
@EnableScheduling  /*开启任务*/
@EnableAsync
@SpringBootApplication
public class Application {
    public static void main(String[] args) {
        ConfigurableApplicationContext run = SpringApplication.run(Application.class, args);
        log.info(run.toString());
    }
}
